
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>通讯录列表</title>	
	 <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link href="../static/css/bootstrap.css" rel="stylesheet">
	<link href="../static/css/site.css" rel="stylesheet">
    <link href="../static/css/bootstrap-responsive.css" rel="stylesheet">
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
  </head>
  <body>
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="brand" href="my">Admin</a>
          <div class="btn-group pull-right">
			<a class="btn" href="my"><i class="icon-user"></i> Admin</a>
            <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
              <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
			  <li><a href="my">个人资料</a></li>
              <li class="divider"></li>
              <li><a href="{{url_for('logout')}}">退出</a></li>
            </ul>
          </div>
          <div class="nav-collapse">
            <ul class="nav">
			<li><a href="my">首页</a></li>
              <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">通讯录 <b class="caret"></b></a>
				<ul class="dropdown-menu">
					<li><a href="show">用户</a></li>
					<li class="divider"></li>
					<li><a href="add">新建用户</a></li>
				</ul>
			  </li>
              <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">IP统计<b class="caret"></b></a>
				<ul class="dropdown-menu">
					<li><a href="lists_pc">IP列表</a></li>
					<li class="divider"></li>
					<li><a href="add_pc">添加IP</a></li>
				</ul>
			  </li>
			
            </ul>
          </div>
        </div>
      </div>
    </div>

    <div class="container-fluid">
      <div class="row-fluid">
        <div class="span3">
          <div class="well sidebar-nav">
            <ul class="nav nav-list">
              <li class="nav-header"><i class="icon-wrench"></i>通讯录</li>
              <li class="active"><a href="show">用户</a></li>
              <li><a href="add">添加用户</a></li>
              <li class="nav-header"><i class="icon-signal"></i> IP统计</li>
              <li><a href="lists_pc">IP列表</a></li>
              <li><a href="addpc">添加IP</a></li>
              <li><a href="#">杂七杂八</a></li>
              <li class="nav-header"><i class="icon-user"></i> 资料</li>
              <li><a href="my">我的资料</a></li>
     
			  <li><a href="{{url_for('logout')}}">退出</a></li> 
            </ul>
          </div>
        </div>
        <div class="span9">
		  <div class="row-fluid">
			<div class="page-header">
				<h1>通讯录 <small>All users</small></h1>
			</div>
			
			<form class="form-search" method="get" action="/search/">
			<input type="text" class="input-medium search-query" name="q" >
			<button type="submit" class="btn">Search</button>
			</form>
			
			<table class="table table-striped table-bordered table-condensed">
			
			
				<thead>
					<tr>
						<th>工号</th>
						<th>姓名</th>
						<th>部门</th>
						<th>电话</th>
														<th class="text-center">删除</th>
                    								  <th class="text-center">编辑</th>
                    								 
						
						<th></th>
					</tr>
				</thead>
				
				
				
				<tbody>
				<tr class="list-users">
				{% for data in contactdata %}
					<td>{{data.number}}</td>
					<td>{{data.username}}</td>
					<td>{{data.job}}</td>
					<td>{{data.tel}}</td>
					
					<td  class="text-center">
					<a class="btn btn-success" href="{{ url_for("delete",page=data.id)}}">删除</a>

                      </td>
					  
                      <td  class="text-center">
                      <a class="btn btn-danger" href="{{ url_for("update",page=data.id) }}">编辑</a>
                      </td>

                    
				</tr>
				{% endfor %}
				
				
				
		
				
				
				
				</tbody>
				
				
				
				
				
			</table>
			<div class="pagination">
			
			
			

		              
                                             
                                                  <li><a href="{% if pagination.has_prev %}{{ url_for("show",
           page = pagination.page - 1) }}{% else %}#{% endif %}">上一页</a></li>
                                                            </li>
                                           {% for p in pagination.iter_pages() %}
                                                {% if p %}
                                          {% if p == pagination.page %}
                                     <li class="active">
                                        <a href="{{ url_for("show", page = p) }}">{{ p }}</a>
                                     </li>
                                         {% else %}
                                     <li>
                                          <a href="{{ url_for("show", page = p) }}">{{ p }}</a>
                                   </li>
                                     {% endif %}
                                         {% else %}
                                  <li class="disabled"><a href="#">&hellip;</a></li>
                         {% endif %}
                  {% endfor %}
           <li{% if not pagination.has_next %} class="disabled"{% endif %}>

                                                  <li><a href="{% if pagination.has_next %}{{ url_for("show",
           page = pagination.page + 1) }}{% else %}#{% endif %}">下一页</a></li>
                                                </ul>

                                      
				
				
			</div>
			<a href="/admin/add" class="btn btn-success">New User</a>
		  </div>
        </div>
      </div>

      <hr>

      <footer class="well">
        &copy; Strass
      </footer>

    </div>

    <script src="../static/js/jquery.js"></script>
	<script src="../static/js/bootstrap.min.js"></script>
	<script>
	$(document).ready(function() {
		$('.dropdown-menu li a').hover(
		function() {
			$(this).children('i').addClass('icon-white');
		},
		function() {
			$(this).children('i').removeClass('icon-white');
		});
		
		if($(window).width() > 760)
		{
			$('tr.list-users td div ul').addClass('pull-right');
		}
	});
	</script>
  </body>
</html>
